<!--#include file="functions.asp" -->
<%

sql = "SELECT TOP 1 * FROM TAXSYS.DBO.DTTAXRATE WHERE CURRENCY_ID = '" & request("curr") & "'"
if request("date") <> "" then
sql = sql & " AND tax_Date <= '" & request("date") & "'"
end if
sql = sql & " order by tax_date desc"
'response.write sql
'response.end
set qGetKurs = cn.execute(sql)
if not qGetKurs.eof then
%>
<script>
	window.opener.document.form1.taxRate<%= request("num") %>.value="<%= qGetKurs("tax_rate") %>";
	window.close();
</script>
<%
else %>

<script>
	window.opener.document.form1.taxRate<%= request("num") %>.value="1";
	window.close();
</script>

<% 
end if %>

